cmake_minimum_required(VERSION 3.5)
project(ProducerConsumer)

# 设置 C++ 标准
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# 添加可执行文件
add_executable(producer_consumer produ_consu.cpp)
add_executable(reader_writer reader_writer.cpp)

# 链接线程库
target_link_libraries(producer_consumer pthread)
target_link_libraries(reader_writer pthread)
